package com.axdoc.wallet.service;

import java.sql.Timestamp;
import java.util.List;

import com.axdoc.wallet.entity.PatientActivitySubWallet;
import com.axdoc.wallet.entity.PatientActivitySubWalletRecords;
import com.axdoc.wallet.entity.PatientBalanceSubWallet;
import com.axdoc.wallet.entity.PatientBalanceSubWalletRecords;
import com.axdoc.wallet.entity.PatientCouponSubWallet;
import com.axdoc.wallet.entity.PatientCouponSubWalletRecords;
import com.axdoc.wallet.entity.PatientVipSubWallet;
import com.axdoc.wallet.entity.PatientVipSubWalletRecords;
import com.axdoc.wallet.entity.PatientWallet;
import com.axdoc.wallet.exceptions.WalletBizException;

/**
 * 患者账户服务接口
 * 
 * @author sunzhaoli
 *
 */
public interface PatientWalletService {
	/**
	 * 创建患者账户
	 * 
	 * @param aid
	 *            账号id
	 * @param walletType
	 *            账户类型：1个人/0团体
	 * @return
	 * @throws WalletBizException
	 * @throws Exception
	 */
	public boolean createPatientWallet(String aid, int walletType) throws WalletBizException, Exception;

	/**
	 * 根据aid查询患者账户信息
	 * 
	 * @param aid
	 *            账号id
	 * @return
	 * @throws WalletBizException
	 * @throws Exception
	 */
	public PatientWallet queryPatientWalletByAid(String aid) throws WalletBizException, Exception;

	/**
	 * 根据aid查询患者余额子账户信息
	 * 
	 * @param aid
	 *            账号id
	 * @return
	 * @throws WalletBizException
	 * @throws Exception
	 */
	public PatientBalanceSubWallet queryPatientBalanceSubWalletByAid(String aid) throws WalletBizException, Exception;

	/**
	 * 根据aid查询患者活动子账户信息
	 * 
	 * @param aid
	 *            账号id
	 * @return
	 * @throws WalletBizException
	 * @throws Exception
	 */
	public PatientActivitySubWallet queryPatientActivitySubWalletByAid(String aid) throws WalletBizException, Exception;

	/**
	 * 根据aid查询患者券子账户信息
	 * 
	 * @param aid
	 *            账号id
	 * @return
	 * @throws WalletBizException
	 * @throws Exception
	 */
	public PatientCouponSubWallet queryPatientCouponSubWalletByAid(String aid) throws WalletBizException, Exception;

	/**
	 * 根据aid查询患者vip子账户信息
	 * 
	 * @param aid
	 *            账号id
	 * @return
	 * @throws WalletBizException
	 * @throws Exception
	 */
	public PatientVipSubWallet queryPatientVipSubWalletByAid(String aid) throws WalletBizException, Exception;

	/**
	 * 修改患者余额子账户信息
	 * 
	 * @param patientBalanceSubWallet
	 * @return
	 * @throws WalletBizException
	 * @throws Exception
	 */
	public boolean updatePatientBalanceSubWallet(PatientBalanceSubWallet patientBalanceSubWallet)
			throws WalletBizException, Exception;

	/**
	 * 修改患者活动子账户信息
	 * 
	 * @param patientActivitySubWallet
	 * @return
	 * @throws WalletBizException
	 * @throws Exception
	 */
	public boolean updatePatientActivitySubWallet(PatientActivitySubWallet patientActivitySubWallet)
			throws WalletBizException, Exception;

	/**
	 * 修改患者券子账户信息
	 * 
	 * @param patientCouponSubWallet
	 * @return
	 * @throws WalletBizException
	 * @throws Exception
	 */
	public boolean updatePatientCouponSubWallet(PatientCouponSubWallet patientCouponSubWallet)
			throws WalletBizException, Exception;

	/**
	 * 修改患者vip子账户信息
	 * 
	 * @param patientVipSubWallet
	 * @return
	 * @throws WalletBizException
	 * @throws Exception
	 */
	public boolean updatePatientVipSubWallet(PatientVipSubWallet patientVipSubWallet)
			throws WalletBizException, Exception;

	/**
	 * 查询患者余额子账户流水
	 * 
	 * @param tradeNo
	 *            平台支付订单号
	 * @param startTime
	 *            开始时间
	 * @param endTime
	 *            结束时间
	 * @throws WalletBizException
	 * @throws Exception
	 * @return
	 */
	public List<PatientBalanceSubWalletRecords> queryBalanceRecords(String tradeNo, String startTime,
			String endTime) throws WalletBizException, Exception;

	/**
	 * 查询患者券子账户流水
	 * 
	 * @param tradeNo
	 *            平台支付订单号
	 * @param startTime
	 *            开始时间
	 * @param endTime
	 *            结束时间
	 * @throws WalletBizException
	 * @throws Exception
	 * @return
	 */
	public List<PatientCouponSubWalletRecords> queryCouponRecords(String tradeNo, String startTime,
			String endTime) throws WalletBizException, Exception;

	/**
	 * 查询患者活动子账户流水
	 * 
	 * @param tradeNo
	 *            平台支付订单号
	 * @param startTime
	 *            开始时间
	 * @param endTime
	 *            结束时间
	 * @throws WalletBizException
	 * @throws Exception
	 * @return
	 */
	public List<PatientActivitySubWalletRecords> queryActivityRecords(String tradeNo, String startTime,
			String endTime) throws WalletBizException, Exception;

	/**
	 * 查询患者vip子账户流水
	 * 
	 * @param tradeNo
	 *            平台支付订单号
	 * @param startTime
	 *            开始时间
	 * @param endTime
	 *            结束时间
	 * @throws WalletBizException
	 * @throws Exception
	 * @return
	 */
	public List<PatientVipSubWalletRecords> queryVipRecords(String tradeNo, String startTime, String endTime)
			throws WalletBizException, Exception;

}
